import {observable,computed,action} from 'mobx'

class TodoList{

    @observable mylist = [546];
    @observable lenght = 0;

    
    @computed get getmylist(){
        return this.mylist;
    }

    @computed get mylenght()
    {
        return this.mylist.length;
    }
    
    @action
    addOne(value){
       this.mylist.push(value);
    }

    @action
    addTen(value){
    for(let i = 0; i<10;i++)
     {
        this.addOne(value);
     }
    }

    @action
    mydelOne(index){
        ///console.log(index);
        this.mylist.slice(index,1);
    }

}export default TodoList